
{if $settings}
<table class="ow_table_1 ow_small ow_form ow_smallmargin">
    {foreach from=$settings key=name item=item}
        {if !in_array($name, $hidden)}
		    <tr class="{cycle name="custom" values="ow_alt2,ow_alt1"}">
                        {if !empty($item.label)}
                            <td class="ow_label">{$item.label|escape:"html"}</td>
                            <td class="ow_value">
                        {else}
                            <td colspan="2">
                        {/if}

                            {if $item.presentation == 'custom'}
                                {$item.markup}
		            {elseif $item.presentation == 'number'}
		                <input type="text" name="{$name}" value="{$item.value}" />
		            {elseif $item.presentation == 'text'}
		                <input type="text" name="{$name}" value="{$item.value}" />
		            {elseif $item.presentation == 'textarea'}
		                <textarea name="{$name}" >{$item.value}</textarea>
		            {elseif $item.presentation == 'checkbox'}
		                <input type="checkbox" name="{$name}"{if $item.value} checked="checked"{/if} />
		            {elseif $item.presentation == 'select'}
		                <select name="{$name}">
		                    {foreach from=$item.optionList key=value item=label}
		                        <option value="{$value}"{if $value == $item.value}selected="selected"{/if}>{$label}</option>
		                    {/foreach}
		                </select>
		            {/if}
		            <div id="error_{$name}" class="setting_error ow_error error"></div>
		        </td>
		    </tr>
        {/if}
    {/foreach}
</table>
{/if}

{block_decorator name='box_cap' iconClass='ow_ic_gear_wheel' langLabel='base+widgets_fb_default_settings_label' type=empty}
{/block_decorator}

{block_decorator name='box' type="empty" addClass="clearfix"}

    <table class="ow_table_1 ow_small ow_form ow_smallmargin">
        {if !in_array('title', $hidden)}
	        <tr class="{cycle name="system" values="ow_alt2,ow_alt1"}">
	            <td class="ow_label">{text key="base+widgets_default_settings_title"}</td>
	            <td class="ow_value">
	                <input type="text" name="title" {if isset($values.title)}value="{$values.title}" beforevalue="{$values.title}"{/if} />
	                <div id="error_title" class="setting_error ow_error error"></div>
	            </td>
	        </tr>
        {/if}
        {if !in_array('show_title', $hidden)}
	        <tr class="{cycle name="system" values="ow_alt2,ow_alt1"}">
	            <td class="ow_label">{text key="base+widgets_default_settings_show_title"}</td>
	            <td class="ow_value">
	                <input type="checkbox" name="show_title" {if isset($values.show_title) && $values.show_title}checked="checked"{/if} />
	                {text key="base+widgets_default_settings_icon"}:
	                <select class="choose_icon" name="icon" >
	                    {foreach from=$avaliableIcons item=icon}
	                        <option value="{$icon.class}" {if isset($values.icon) && $values.icon == $icon.class}selected="selected"{/if} >
	                            {$icon.label}
	                        </option>
	                    {/foreach}
	                </select>
	            </td>
	        </tr>
        {/if}
        {if !in_array('wrap_in_box', $hidden)}
	        <tr class="{cycle name="system" values="ow_alt2,ow_alt1"}">
	            <td class="ow_label">{text key="base+widgets_default_settings_wib"}</td>
	            <td class="ow_value">
	                <input type="checkbox" name="wrap_in_box" {if isset($values.wrap_in_box) && $values.wrap_in_box}checked="checked"{/if} />
	            </td>
	        </tr>
        {/if}
        {if !in_array('freeze', $hidden)}
	        <tr class="{cycle name="system" values="ow_alt2,ow_alt1"}">
	            <td class="ow_label">{text key="base+widgets_default_settings_freeze"}</td>
	            <td class="ow_value">
	                <input type="checkbox" name="freeze" {if isset($values.freeze) && $values.freeze}checked="checked"{/if} />
	            </td>
	        </tr>
        {/if}
    </table>
{/block_decorator}